<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:f="http://java.sun.com/jsf/core">

<!--
    
    Copyright 2007-2012 Audrius Valunas

    This file is part of LibreACS.

    LibreACS is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    LibreACS is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with LibreACS.  If not, see <http://www.gnu.org/licenses/>.

    -->

<ui:composition template="mt.xhtml">
	<ui:define name="title">Cpe info for #{Cpe.sn}</ui:define>
	<ui:define name="body">

		<a4j:form id="cpedetails">
			<h:panelGrid class="dr-pnl-b rich-panel-body" columns="1"
				rendered="#{Cpe.findResultLength==1}">
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="Connection request"></h:outputText>
					</f:facet>
					<h:outputText value="Username:" />
					<rich:spacer width="5" />
					<h:inputText value="#{Cpe.conreqUser}" />
					<rich:spacer width="10" />
					<h:outputText value="Password:" />
					<rich:spacer width="5" />
					<h:inputText value="#{Cpe.conreqPass}" />
				</rich:panel>
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="ACS credentials on CPE"></h:outputText>
					</f:facet>
					<h:outputText value="Authentication type:" />
					<rich:spacer width="5" />
					<h:selectOneMenu value="#{Cpe.authType}">
						<f:selectItem itemValue="0" itemLabel="None" />
						<f:selectItem itemValue="1" itemLabel="Basic" />
						<f:selectItem itemValue="2" itemLabel="MD5" />
					</h:selectOneMenu>
					<rich:spacer width="10" />
					<h:outputText value=" Username:" />
					<rich:spacer width="5" />
					<h:inputText value="#{Cpe.user}" />
					<rich:spacer width="10" />
					<h:outputText value=" Password:" />
					<rich:spacer width="5" />
					<h:inputText value="#{Cpe.password}" />
				</rich:panel>
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="Profile and Config settings"></h:outputText>
					</f:facet>
					<h:outputText value="Profile:" />
					<rich:spacer width="5" />
					<h:selectOneMenu value="#{Cpe.profileName}">
						<f:selectItems value="#{DeviceProfile.list}" />
					</h:selectOneMenu>
					<rich:spacer width="10" />
					<h:outputText value="Config name:" />
					<rich:spacer width="5" />
					<h:selectOneMenu value="#{Cpe.configname}">
						<f:selectItems value="#{Cpe.configs}" />
					</h:selectOneMenu>
				</rich:panel>
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="Customer features"></h:outputText>
					</f:facet>
					<h:outputText value="Customer ID:" />
					<rich:spacer width="5" />
					<h:inputText value="#{Cpe.customerId}" />
				</rich:panel>
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="Properties"></h:outputText>
					</f:facet>
					<h:panelGrid columns="1">
						<h:outputText
							value='Hint: properties can be used in scripts and in configurations as &#35; {property_name}' />
						<h:inputTextarea rows="20" cols="100" value="#{Cpe.proptext}" />
					</h:panelGrid>
					<a4j:commandButton type="submit" value="Save" action="#{Cpe.Save}"
						reRender="cpedetails" />
				</rich:panel>
			</h:panelGrid>
		</a4j:form>
	</ui:define>
	<ui:define name="lmenu">
		<ui:include src="cpe_menu.xhtml" />
	</ui:define>

</ui:composition>
</html>